The Transparent Interconnection of Lots of Links (TRILL) is a new protocol used to construct a large-scale Layer 2 network. In a TRILL multi-homing active-active scenario, a customer edge (CE) is connected to two routing bridges (RBs), RB1 and RB2, to perform active-active networking. In this case, a multicast packet sent by the CE may be sent to the RB2 by the RB1 after being encapsulated by the RB1, and then sent to the CE after being decapsulated by the RB2. In this way, the CE receives the packet sent by the CE, which results in cycling of a multicast packet in a network and a waste of network resources. Therefore, it is necessary to avoid this case.
To avoid the foregoing case, a solution of a virtual nickname is used in the prior art. If a CE is connected to two routing bridges, the two routing bridges form an edge group. The routing bridges in the edge group have a common virtual nickname. When the routing bridges in the edge group perform TRILL protocol encapsulation on a multicast packet sent by the CE, a source routing bridge nickname in a TRILL header is the virtual nickname. If a CE is connected to only one routing bridge, when the routing bridge performs TRILL encapsulation on a multicast packet sent by the CE, a source routing bridge nickname in a TRILL header is a real nickname of the routing bridge. As shown in FIG. 1, CE1 is connected to RB1, CE2 is connected to RB1 and RB2, and CE3 is connected to RB2. CE2 sends a multicast packet to RB1. When RB1 performs TRILL encapsulation on the multicast packet, a source routing bridge nickname in a TRILL header is a virtual nickname. After receiving the TRILL encapsulated multicast packet, the RB2 performs determining according to the source routing bridge nickname in the TRILL header of the multicast packet. When determining that the source routing bridge nickname is a virtual nickname, after obtaining the original multicast packet by decapsulating the TRILL encapsulated multicast packet, the RB2 only forwards one copy of the original multicast packet to the CE3 but does not forward it to the CE2, so as to prevent the multicast packet sent by the CE2 from being returned to the CE2.
However, the inventor of this application finds in the research that, it is required in the foregoing solution that an RB can encapsulate different nicknames into a source routing bridge nickname of a TRILL header when the RB performs TRILL encapsulation on a multicast packet based on a source port. This imposes a special requirement on a chip. When there are quite a few dual-homing groups (that is, a case in which one CE is connected to two RBs), an RB is also required to support quite a few nicknames, but it is difficult for a current commercial chip to provide support.